<?php

namespace Managers;

class Rotator extends BaseManager
{
       protected $__table = '\Catalog\Rotator';




    public  function  getList()

    {

         return $this->_em->createQueryBuilder($ispublished=1)
                ->select("s")
                ->from($this->__table, "s")
                ->where("s.ispublished = :ispublished")->setParameter("ispublished", $ispublished)
                ->getQuery()
                ->getArrayResult();
    }



    public  function  getOne($id)
      {
         $res = $this->_em->createQueryBuilder()
                  ->select('p')
                  ->from($this->__table, 'p')
                  ->where("p.id= :id")->setParameter('id', $id)
                  ->getQuery()
                  ->getArrayResult();
          return $res;
      }







}
